<template>
	<div class="paper">
		<div class="title">
			基本信息
		</div>
		<div class="child">
			<div class="childspan">姓名：{{bedUserData.userName}}</div>
			<div class="childspan">性别：{{bedUserData.sex}}</div>
			<div class="childspan">护理等级：{{bedUserData.nurseClass}}</div>
		</div>
		<div class="child">
			<div class="childspan">护士：{{bedUserData.nurse}}</div>
			<div class="childspan">护工：{{bedUserData.nursingWorkers}}</div>
			<div class="childspan">医生：{{bedUserData.doctor}}</div>
		</div>
		<div style="margin-left: 15px;">
			床位状态：有人
		</div>

		<form>
			<table style="width: 100%;">
				<thead>
					<div class="title" style="display: flex;">
						<td style=" width: 33%">
							护理内容
						</td>
						<td style=" width: 33%;">
							护理时间
						</td>
						<td style=" width: 33%;">
							操作人
						</td>
					</div>
				</thead>
				<tbody style="width: 100%;">
					<div class="tablebody" style="" v-for="item in NurseRecordData">
						<td style=" width: 33%;">{{item.content}}</td>
						<td style=" width: 33%;">{{item.time}}</td>
						<td style=" width: 33%;">{{item.people}}</td>
					</div>
				</tbody>
			</table>
		</form>
		<div class="title">
			膳食情况
		</div>
		<div>
			<textarea cols="10" style="width: 98%; height: 100px; margin: 10px 10px;resize: none;"
				:value="bedUserData.cooking">
			</textarea>
		</div>
		<div class="title">
			注意事项
		</div>
		<div>
			<textarea cols="10" style="width: 98%; height: 100px; margin: 10px 10px;resize: none;"
				:value="bedUserData.emphasis">
			</textarea>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'selectOne',
		props: ['bedNum'],
		data() {
			return {
				bedUserData: [],
				NurseRecordData: [{
						content: "无",
						time: "无",
						people: "无"
					}
				]
			}
		},
		methods: {
			
		},
		created() {
			this.axios.get('/bedUser/getOneByBedNum', response => {
				this.bedUserData = response.obj;
				this.axios.get('/nurseRecord/getByName', res => {
					console.log(res.obj)
					this.NurseRecordData = res.obj;
				}, {
					customer: response.obj.userName
				})
			}, {
				bedNum: this.bedNum
			});
			
		}
	}
</script>

<style scoped>
	.title {
		height: 25px;
		padding-left: 8px;
		font-size: 14px;
		line-height: 25px;
		width: 100%;
		background-color: #adadad;
	}

	.child {
		margin: 10px 0px;
		padding-bottom: 10px;
		border-bottom: 0.5px solid lightgrey;
		display: flex;
	}

	.childspan {

		flex: 1;
		margin-left: 30px;
	}

	.tablebody {
		width: 100%;
		display: flex;
		padding-left: 10px;
		padding-bottom: 10px;
		padding-top: 5px;
		border-bottom: 0.5px solid lightgray;
	}
</style>-
